QT       += core gui
QT       += xml
QT       += sql
QT       += serialport
QT       += network
QT       += multimedia multimediawidgets

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport concurrent

CONFIG += c++11

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

DEFINES += QS_LOG_SEPARATE_THREAD

#DEFINES += GPIO

# Application version
DEFINES += APPLICATION_VERSION=\"\\\"1.0.0\\\"\"
# Exit code which is used to reboot the application
DEFINES += REBOOT_CODE=2024

SOURCES += \
    appcore.cpp \
    application.cpp \
    communication/crc16.cpp \
    communication/serialport.cpp \
    communication/udpserver.cpp \
    config/jsonconfig.cpp \
    config/xmlconfig.cpp \
    databaseinterface.cpp \
    datasimucache.cpp \
    datasimustorage.cpp \
    datasimuthread.cpp \
    dialog/dlg1553.cpp \
    dialog/dlgfault.cpp \
    dialog/dlghistory.cpp \
    dialog/dlglevel.cpp \
    dialog/dlgmodbusrtu.cpp \
    dialog/dlgreport.cpp \
    dialog/dlgsystemset.cpp \
    dialog/msgbox.cpp \
    form/formchannelcoefficient.cpp \
    form/formhelp.cpp \
    form/formrealtimedata.cpp \
    form/formrealtimeplot.cpp \
    form/formtestinfo.cpp \
    globalstatic.cpp \
    globalsymbol.cpp \
    graphicsitem/freqa11item.cpp \
    graphicsitem/freqa12item.cpp \
    graphicsitem/freqa22item.cpp \
    graphicsitem/freqa24item.cpp \
    graphicsitem/freqw11item.cpp \
    graphicsitem/freqw12item.cpp \
    graphicsitem/freqw22item.cpp \
    graphicsitem/freqw24item.cpp \
    graphicsitem/polarfeatureitem.cpp \
    graphicsitem/positionfeature1item.cpp \
    graphicsitem/positionfeature2item.cpp \
    graphicsitem/positionfeature3item.cpp \
    graphicsitem/positionfeatureitem.cpp \
    graphicsitem/pressurefeatureitem.cpp \
    graphicsitem/systemsetitem.cpp \
    graphicsitem/transientfeatureitem.cpp \
    graphicsitem/zeropositionitem.cpp \
    graphicsitem/zeropositionstaticitem.cpp \
    localcontext.cpp \
    main.cpp \
    mainwindow.cpp \
    qcustomplot/qcustomplot.cpp \
    tinyxml2/tinyxml2.cpp   \
    util/byteutil.cpp \
    videocontroller.cpp \
    videowindow.cpp

HEADERS += \
    appcore.h \
    application.h \
    communication/crc16.h \
    communication/serialport.h \
    communication/udpserver.h \
    config/jsonconfig.h \
    config/xmlconfig.h \
    databaseinterface.h \
    datasimucache.h \
    datasimustorage.h \
    datasimuthread.h \
    datastruct.h \
    dialog/dlg1553.h \
    dialog/dlgfault.h \
    dialog/dlghistory.h \
    dialog/dlglevel.h \
    dialog/dlgmodbusrtu.h \
    dialog/dlgreport.h \
    dialog/dlgsystemset.h \
    dialog/msgbox.h \
    enum.h \
    form/formchannelcoefficient.h \
    form/formhelp.h \
    form/formrealtimedata.h \
    form/formrealtimeplot.h \
    form/formtestinfo.h \
    globalstatic.h \
    globalsymbol.h \
    graphicsitem/freqa11item.h \
    graphicsitem/freqa12item.h \
    graphicsitem/freqa22item.h \
    graphicsitem/freqa24item.h \
    graphicsitem/freqw11item.h \
    graphicsitem/freqw12item.h \
    graphicsitem/freqw22item.h \
    graphicsitem/freqw24item.h \
    graphicsitem/polarfeatureitem.h \
    graphicsitem/positionfeature1item.h \
    graphicsitem/positionfeature2item.h \
    graphicsitem/positionfeature3item.h \
    graphicsitem/positionfeatureitem.h \
    graphicsitem/pressurefeatureitem.h \
    graphicsitem/systemsetitem.h \
    graphicsitem/transientfeatureitem.h \
    graphicsitem/zeropositionitem.h \
    graphicsitem/zeropositionstaticitem.h \
    localcontext.h \
    mainwindow.h \
    qcustomplot/qcustomplot.h \
    simufactory/simufactory.h \
    simufactory/simuvalue.h \
    tinyxml2/tinyxml2.h   \
    util/byteutil.h \
    videocontroller.h \
    videowindow.h

FORMS += \
    dialog/dlg1553.ui \
    dialog/dlgfault.ui \
    dialog/dlghistory.ui \
    dialog/dlglevel.ui \
    dialog/dlgmodbusrtu.ui \
    dialog/dlgreport.ui \
    dialog/dlgsystemset.ui \
    form/formchannelcoefficient.ui \
    form/formhelp.ui \
    form/formrealtimedata.ui \
    form/formrealtimeplot.ui \
    form/formtestinfo.ui \
    mainwindow.ui \
    videowindow.ui

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

RESOURCES += res.qrc
RC_ICONS = $$PWD/res/icon/Servo.ico

CONFIG += debug_and_release
CONFIG(debug, debug|release) {
        DESTDIR    += $$PWD/debug
        OBJECTS_DIR = $$PWD/debug/obj
        UI_DIR      = $$PWD/debug/ui
        MOC_DIR     = $$PWD/debug/moc
        RCC_DIR     = $$PWD/debug/rcc
} else {
        DESTDIR    += $$PWD/release
        OBJECTS_DIR = $$PWD/release/obj
        UI_DIR      = $$PWD/release/ui
        MOC_DIR     = $$PWD/release/moc
        RCC_DIR     = $$PWD/release/rcc
}


CONFIG(release, debug|release): LIBS += -L$$PWD/sdk/QsLog/lib/x64/ -lQsLog
else:CONFIG(debug, debug|release): LIBS += -L$$PWD/sdk/QsLog/lib/x64/ -lQsLogd

INCLUDEPATH += $$PWD/sdk/QsLog/include
DEPENDPATH += $$PWD/sdk/QsLog/include

#win32: LIBS += -L$$PWD/sdk/OlsApi/lib/x86/ -lWinRing0
win32: LIBS += -L$$PWD/sdk/OlsApi/lib/x64/ -lWinRing0x64

INCLUDEPATH += $$PWD/sdk/OlsApi/include
DEPENDPATH += $$PWD/sdk/OlsApi/include
